package com.qingmu.club.minaapi.plus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 会员积分明细表
 * </p>
 *
 * @author duke
 * @since 2019-12-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ClubUsersIntegral extends Model<ClubUsersIntegral> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 会员积分主表id
     */
    private String clubUsersId;

    /**
     * 会员id
     */
    private String userId;

    /**
     * 所属门店id
     */
    private String shopId;

    /**
     * 会员名称
     */
    private String clubUsersName;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 0-减少 1-增加
     */
    private Integer type;

    /**
     * 积分名称
     */
    private String integralName;

    /**
     * 积分数量
     */
    private Integer integralNum;

    /**
     * 0-人员手动操作 1-系统自动操作 (2-购买商品扣减)-变更为1
     */
    private Integer integralType;

    /**
     * 操作人id
     */
    private String createUserId;

    /**
     * 操作人名称
     */
    private String createUserName;

    /**
     * 商品图片
     */
    private String goodsImage;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 操作类型 0-购买商品扣积分 1-分享得积分 2-魔力拼团得积分
     */
    private Integer integralChangeType;


    public static final String ID = "id";

    public static final String CLUB_USERS_ID = "club_users_id";

    public static final String USER_ID = "user_id";

    public static final String SHOP_ID = "shop_id";

    public static final String CLUB_USERS_NAME = "club_users_name";

    public static final String CREATE_TIME = "create_time";

    public static final String TYPE = "type";

    public static final String INTEGRAL_NAME = "integral_name";

    public static final String INTEGRAL_NUM = "integral_num";

    public static final String INTEGRAL_TYPE = "integral_type";

    public static final String CREATE_USER_ID = "create_user_id";

    public static final String CREATE_USER_NAME = "create_user_name";

    public static final String GOODS_IMAGE = "goods_image";

    public static final String GOODS_NAME = "goods_name";

    public static final String INTEGRAL_CHANGE_TYPE = "integral_change_type";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
